package cn.stylefeng.guns.modular.order.service;

import java.util.List;

import cn.stylefeng.guns.modular.rest.transport.vo.GoodQueryVo;
import cn.stylefeng.guns.modular.storage.model.params.StorageOutParam;
import org.springframework.web.multipart.MultipartFile;

import com.baomidou.mybatisplus.extension.service.IService;

import cn.stylefeng.guns.base.pojo.page.LayuiPageInfo;
import cn.stylefeng.guns.modular.order.entity.OrderTransport;
import cn.stylefeng.guns.modular.order.model.params.OrderPutParam;
import cn.stylefeng.guns.modular.order.model.params.OrderTransportParam;
import cn.stylefeng.guns.modular.order.model.params.OutOrderParam;
import cn.stylefeng.guns.modular.order.model.result.OrderTransportResult;
import cn.stylefeng.roses.core.reqres.response.ResponseData;

/**
 * 货运订单表 服务类
 */
public interface OrderTransportService extends IService<OrderTransport> {

    /**
     * 新增
     */
    void add(OrderTransportParam param);

    /**
     * 删除
     */
    void delete(OrderTransportParam param);

    /**
     * 更新
     */
    void update(OrderTransportParam param);

    /**
     * 查询单条数据，Specification模式
     */
    OrderTransportResult findBySpec(OrderTransportParam param,Long operateId);

    /**
     * 查询列表，Specification模式
     */
    List<OrderTransportResult> findListBySpec(OrderTransportParam param,String carnumbger,String carState);

    /**
     * 查询分页数据，Specification模式
     */
     LayuiPageInfo findPageBySpec(OrderTransportParam param,String condition,Long operateId);

     /**
      * 获取最后一条记录
      * @return
      */
	 OrderTransport findByThelastone();

	 List<OrderTransportResult> findListByids(Long[] ids);

	 /**
	  * 入库添加货运单
	  * @param orderPutParam
	  * @param orderTransportParam
	  */
	void putaddTransport(OrderPutParam orderPutParam, OrderTransportParam orderTransportParam);
	
	/**
	  * 入库修改货运单
	  * @param orderPutParam
	  * @param orderTransportParam
	  */
	void puteditTransport(OrderPutParam orderPutParam, OrderTransportParam orderTransportParam);

	/**
	 * 提交入库订单 更新货运单
	 * @param param
	 */
	void updateTransport(OrderPutParam param);

	/**
	 * 出库添加货运单
	 * @param outOrderParam
	 * @param orderTransportParam
	 */
	void outAddTransport(OutOrderParam outOrderParam, OrderTransportParam orderTransportParam);

	/**
	 * 出库修改货运单
	 * @param outOrderParam
	 * @param orderTransportParam
	 */
	void outEditTransport(OutOrderParam outOrderParam, OrderTransportParam orderTransportParam);

	/**
	 * 提交出库订单   更新货运单
	 * @param outOrderParam
	 */
	void outUpdateTransport(OutOrderParam outOrderParam);

	/**
	 * APP查询待配运力客户
	 * @param orderTransportParam
	 * @return
	 */
	LayuiPageInfo listgetUnit(OrderTransportParam orderTransportParam);
	/**
	 * APP查询客户配置详情
	 * @param orderTransportParam
	 * @return
	 */
	OrderTransportResult unitDetailsSingle(OrderTransportParam orderTransportParam);
	
	/**
	 * 查询已配置车辆 配置详情
	 * @param orderTransportParam
	 * @param carnumbger
	 * @return
	 */
	List<OrderTransportResult> carDetailsSingle(OrderTransportParam orderTransportParam, String carnumbger,String carState);

	/**
	 * web 调度查询
	 * 查询货运单
	 * @param orderTransportParam
	 * @param condition
	 * @return
	 */
	LayuiPageInfo dispatchlistPageBySpec(OrderTransportParam orderTransportParam, String condition,Long operateId);

	List<OrderTransportResult> carDetailsSingleToo(OrderTransportParam orderTransportParam, Long carId,String dispatch,Long operateId);

	List<OrderTransportResult> carDetailsSingleToo2(OrderTransportParam orderTransportParam, Long carId,Long operateId);

	/**
	 * 查询列表，司机查询订单
	 */
	List<OrderTransportResult> findListByDeliverId(OrderTransportParam orderTransportParam, String carnumbger,Long carid);

	List<OrderTransportResult> findByUL(OrderTransportParam orderTransportParam);

	/**
	 * 批量保存List
	 * @param transportList
	 * @return
	 */
	boolean saveBatchList(List<OrderTransportParam> list);

	LayuiPageInfo findByQuery(OrderTransportParam orderTransportParam, String condition,Long operateId);

	ResponseData revokeS(OrderTransport orderTransport, ResponseData data);

	LayuiPageInfo listgetUnitNew(OrderTransportParam orderTransportParam);

	List<OrderTransportResult> findListBySpecNew(OrderTransportParam orderTransportParam,Long operateId);

	List<OrderTransportResult> findAutoPrintSum(OrderTransportParam orderTransportParam);

	List<OrderTransportResult> findListBySpecByGetUnitId(OrderTransportParam orderTransportParam,Long operateId);


	List<GoodQueryVo> goodQueryList(StorageOutParam param);

	boolean auditorder(Integer id);

	List<OrderTransportResult> listgetUnitNewNew(OrderTransportParam orderTransportParam,Long operateId);

	List<OrderTransportResult> findListBySpecNewNew(OrderTransportParam orderTransportParam, String carnumbger,
			String carState);

	List<OrderTransportResult> findListBySpecNewNewNew(OrderTransportParam orderTransportParam, String dispatchNumber,Long operateId);

	List<OrderTransportResult> findListBySpecNewsss(OrderTransportParam orderTransportParam, String dispatchNumber,Long operateId);

	ResponseData getExceldata(MultipartFile file, OrderTransportParam orderTransportParam, ResponseData data) throws Exception;
	
	Integer sumDayNewOrderCount(OrderTransportParam orderTransportParam);

	Integer sumDayWeiFaYunOrderCount(OrderTransportParam orderTransportParam);

	Double sumDayOrderVolume(OrderTransportParam orderTransportParam3);

	Integer sumMonthNewOrderCount(OrderTransportParam orderTransportParam);

	Integer sumMonthYqianshouOrderCount(OrderTransportParam orderTransportParam2);

	Double sumMonthOrderVolume(OrderTransportParam orderTransportParam3);

	Integer sumMonthNewOrderCount2(OrderTransportParam orderTransportParam, String month);

	Integer sumMonthYqianshouOrderCount2(OrderTransportParam orderTransportParam2, String month);

	Integer sumMonthYhuidanOrderCount(OrderTransportParam orderTransportParam3, String month);

	LayuiPageInfo findDispatchPageBySpec(OrderTransportParam orderTransportParam, String condition,Long operateId);

	LayuiPageInfo findTmsAnalysislist(OrderTransportParam orderTransportParam, String condition,Long operateId);

	void updateBySpec(OrderTransportParam orderTransportParam);

	void updateBySpec2(OrderTransportParam orderTransportParam);

	OrderTransportResult findSumBySpec(OrderTransportParam orderTransportParam);

	List<OrderTransportResult> findGetUnitVol(Long operateId,List<String> xlbClientIdList);

	LayuiPageInfo findOrderTransportCountBySpec(OrderTransportParam orderTransportParam, String condition,
			Long operateId);

	void taskJobJh();

	OrderTransportResult checkyouwu(OrderTransportParam ch);

	void updateOauth2TokenXlb();

	OrderTransportResult carDetailsSingleToo1(OrderTransportParam oParam, Long carId, Long operateId);

	List<OrderTransportResult> carDetailsSingleToo3(OrderTransportParam orderTransportParam);

	List<OrderTransportResult> findOrderTransportCountDataBySpec(OrderTransportParam orderTransportParam, String month);

	LayuiPageInfo findAllOrder();

	List<OrderTransportResult> findStockPort(OrderTransportParam orderTransportParam2);

	OrderTransportResult findByTransportNumberOrOrderNumber(OrderTransportParam otp);

	List<OrderTransportResult> findPieceNumberNumBySpec(String dispatchNumber);


	List<OrderTransportResult> getUnitList(String dispatchNumber);


}
